<template>
  <div class="layout-default">
    <!-- 导航栏 -->
    <AppHeader />

    <!-- 主内容区 -->
    <main class="min-h-screen">
      <slot />
    </main>

    <!-- 页脚 -->
    <AppFooter />

    <!-- 全局通知 -->
    <Toast ref="toastRef" />
  </div>
</template>

<script setup lang="ts">
const toastRef = ref()
const { setToastInstance } = useToast()

onMounted(() => {
  if (toastRef.value) {
    setToastInstance(toastRef.value)
  }
})
</script>


